package constant

import (
	"github.com/lab-online/pkg/gen"
	"github.com/lab-online/pkg/resp"
)

const (
	baseSuccessCode             = resp.CodeSuccess + domainCode
	CodeCreateClassSuccess      = baseSuccessCode + 0
	CodeSearchClassSuccess      = baseSuccessCode + 1
	CodeRemoveClassSuccess      = baseSuccessCode + 2
	CodeUpdateClassSuccess      = baseSuccessCode + 3
	CodeGetClassSuccess         = baseSuccessCode + 4
	CodeUpdateStudentSuccess    = baseSuccessCode + 5
	CodeGetClassStudentsSuccess = baseSuccessCode + 6
)

func SuccessCodeMap() gen.CodeMap {
	return gen.CodeMap{
		"CreateClass": {
			CodeCreateClassSuccess: "课程创建成功",
		},
		"SearchClass": {
			CodeSearchClassSuccess: "课程查询成功",
		},
		"RemoveClass": {
			CodeRemoveClassSuccess: "课程删除成功",
		},
		"UpdateClass": {
			CodeUpdateClassSuccess: "课程更新成功",
		},
		"GetClass": {
			CodeGetClassSuccess: "课程详情获取成功",
		},
		"UpdateStudent": {
			CodeUpdateStudentSuccess: "学生更新成功",
		},
		"GetClassStudents": {
			CodeGetClassStudentsSuccess: "学生列表获取成功",
		},
	}
}
